.class public Lcom/brixd/niceapp/community/adapter/AlbumAdapter;
.super Landroid/widget/BaseAdapter;
.source "AlbumAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnPictureCheckedChangeListener;,
        Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnImageClickedListener;,
        Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;
    }
.end annotation


# instance fields
.field private mBorderWidth:I

.field private mContext:Landroid/content/Context;

.field private mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

.field private mOnCheckedChangeListener:Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnPictureCheckedChangeListener;

.field private mOnImageClickedListener:Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnImageClickedListener;

.field private mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

.field private mPictures:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/PictureModel;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/ArrayList;)V
    .registers 6
    .param p1, "context"    # Landroid/content/Context;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/PictureModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .local p2, "pictures":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/community/model/PictureModel;>;"
    const v2, 0x7f0200d8

    const/4 v1, 0x1

    .line 35
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 36
    iput-object p1, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mContext:Landroid/content/Context;

    .line 37
    iput-object p2, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mPictures:Ljava/util/ArrayList;

    .line 39
    invoke-static {}, Lcom/nostra13/universalimageloader/core/ImageLoader;->getInstance()Lcom/nostra13/universalimageloader/core/ImageLoader;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    .line 40
    new-instance v0, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    .line 41
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->resetViewBeforeLoading(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheInMemory(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 42
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheOnDisc(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;->EXACTLY:Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;

    .line 43
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->imageScaleType(Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;

    .line 44
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->bitmapConfig(Landroid/graphics/Bitmap$Config;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 45
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnFail(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 46
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnLoading(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 47
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageForEmptyUri(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    new-instance v1, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;

    invoke-direct {v1}, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;-><init>()V

    .line 48
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->displayer(Lcom/nostra13/universalimageloader/core/display/BitmapDisplayer;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 49
    return-void
.end method

.method static synthetic access$000(Lcom/brixd/niceapp/community/adapter/AlbumAdapter;)Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnPictureCheckedChangeListener;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/adapter/AlbumAdapter;

    .prologue
    .line 23
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mOnCheckedChangeListener:Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnPictureCheckedChangeListener;

    return-object v0
.end method

.method static synthetic access$100(Lcom/brixd/niceapp/community/adapter/AlbumAdapter;)Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnImageClickedListener;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/adapter/AlbumAdapter;

    .prologue
    .line 23
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mOnImageClickedListener:Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnImageClickedListener;

    return-object v0
.end method


# virtual methods
.method public getCount()I
    .registers 2

    .prologue
    .line 53
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .registers 3
    .param p1, "position"    # I

    .prologue
    .line 58
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .registers 4
    .param p1, "position"    # I

    .prologue
    .line 63
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .registers 12
    .param p1, "position"    # I
    .param p2, "convertView"    # Landroid/view/View;
    .param p3, "parent"    # Landroid/view/ViewGroup;

    .prologue
    .line 69
    if-nez p2, :cond_86

    .line 70
    iget-object v4, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mContext:Landroid/content/Context;

    const v5, 0x7f030024

    const/4 v6, 0x0

    invoke-static {v4, v5, v6}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 71
    new-instance v1, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;-><init>(Lcom/brixd/niceapp/community/adapter/AlbumAdapter;)V

    .line 72
    .local v1, "holder":Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;
    const v4, 0x7f0a00b3

    invoke-virtual {p2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/ImageView;

    iput-object v4, v1, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;->cover:Landroid/widget/ImageView;

    .line 73
    const v4, 0x7f0a00b4

    invoke-virtual {p2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    iput-object v4, v1, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;->chkArea:Landroid/view/View;

    .line 74
    const v4, 0x7f0a00b5

    invoke-virtual {p2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/CheckBox;

    iput-object v4, v1, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;->chk:Landroid/widget/CheckBox;

    .line 76
    iget-object v4, v1, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;->cover:Landroid/widget/ImageView;

    invoke-virtual {v4}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v2

    .line 77
    .local v2, "params":Landroid/view/ViewGroup$LayoutParams;
    iget v4, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mBorderWidth:I

    iput v4, v2, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 78
    iget v4, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mBorderWidth:I

    iput v4, v2, Landroid/view/ViewGroup$LayoutParams;->height:I

    .line 80
    iget-object v4, v1, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;->chkArea:Landroid/view/View;

    invoke-virtual {v4}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    .line 81
    .local v0, "chkAreaParams":Landroid/view/ViewGroup$LayoutParams;
    iget v4, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mBorderWidth:I

    div-int/lit8 v4, v4, 0x2

    iput v4, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 82
    iget v4, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mBorderWidth:I

    div-int/lit8 v4, v4, 0x2

    iput v4, v0, Landroid/view/ViewGroup$LayoutParams;->height:I

    .line 84
    invoke-virtual {p2, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 89
    .end local v0    # "chkAreaParams":Landroid/view/ViewGroup$LayoutParams;
    .end local v2    # "params":Landroid/view/ViewGroup$LayoutParams;
    :goto_53
    iget-object v4, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v4, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/brixd/niceapp/community/model/PictureModel;

    .line 90
    .local v3, "picture":Lcom/brixd/niceapp/community/model/PictureModel;
    iget-object v4, v1, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;->chk:Landroid/widget/CheckBox;

    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/PictureModel;->isChecked()Z

    move-result v5

    invoke-virtual {v4, v5}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 91
    iget-object v4, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/PictureModel;->getImageUriPath()Ljava/lang/String;

    move-result-object v5

    iget-object v6, v1, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;->cover:Landroid/widget/ImageView;

    iget-object v7, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v4, v5, v6, v7}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 93
    iget-object v4, v1, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;->chkArea:Landroid/view/View;

    new-instance v5, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$1;

    invoke-direct {v5, p0, v1, v3}, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$1;-><init>(Lcom/brixd/niceapp/community/adapter/AlbumAdapter;Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;Lcom/brixd/niceapp/community/model/PictureModel;)V

    invoke-virtual {v4, v5}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 104
    iget-object v4, v1, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;->cover:Landroid/widget/ImageView;

    new-instance v5, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$2;

    invoke-direct {v5, p0, p1}, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$2;-><init>(Lcom/brixd/niceapp/community/adapter/AlbumAdapter;I)V

    invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 114
    return-object p2

    .line 86
    .end local v1    # "holder":Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;
    .end local v3    # "picture":Lcom/brixd/niceapp/community/model/PictureModel;
    :cond_86
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;

    .restart local v1    # "holder":Lcom/brixd/niceapp/community/adapter/AlbumAdapter$ViewHolder;
    goto :goto_53
.end method

.method public setBorderWidth(I)V
    .registers 2
    .param p1, "borderWidth"    # I

    .prologue
    .line 124
    iput p1, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mBorderWidth:I

    .line 125
    return-void
.end method

.method public setOnImageClickedListener(Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnImageClickedListener;)V
    .registers 2
    .param p1, "listener"    # Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnImageClickedListener;

    .prologue
    .line 132
    iput-object p1, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mOnImageClickedListener:Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnImageClickedListener;

    .line 133
    return-void
.end method

.method public setOnPictureCheckedChangeListener(Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnPictureCheckedChangeListener;)V
    .registers 2
    .param p1, "listener"    # Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnPictureCheckedChangeListener;

    .prologue
    .line 140
    iput-object p1, p0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->mOnCheckedChangeListener:Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnPictureCheckedChangeListener;

    .line 141
    return-void
.end method
